package com.yingxin.yxerp.module.sys.entity.builder;

import cn.hutool.core.bean.BeanUtil;
import com.yingxin.yx.framework.commons.constant.CommonConst;
import com.yingxin.yx.framework.commons.id.IdHelper;
import com.yingxin.yxerp.module.sys.entity.OtherSet;
import com.yingxin.yxerp.module.sys.vo.req.OtherSetCreateVo;
import org.apache.commons.lang3.StringUtils;

/**
 * 字典表构造器
 * yuebao
 * 2024-12-08
 */

public class OtherSetBuilder {

    /**
     * 集合构造器 build
     */
    public static OtherSet listBuild(OtherSetCreateVo createVo) {
        OtherSet otherSet = new OtherSet();
        BeanUtil.copyProperties( createVo, otherSet );
        if( StringUtils.isBlank( otherSet.getId() ) ){
            otherSet.setId( IdHelper.snowflakeId() );
        }
        otherSet.setDelFlag( CommonConst.FALSE );
        return otherSet;
    }

}
